package org.knot.mockejb3.annotation;

/**
 * 对注释Init的处理
 * 
 * @author yuxiaowei
 *
 */
public class InitAnnotationRuleImpl implements AnnotationRule, org.knot.mockejb3.annotation.lifeCycle.Init{

    public void invoke(RuleParams params) throws Exception {
        
       Object[] os =  new Object[]{};
       if (params.getMethod().getParameterTypes().length!=0)
       {
           os =  new Object[params.getMethod().getParameterTypes().length];
       }
       params.getMethod().invoke(params.getSessionBean().getBean(), os);
    }

}
